
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../common.dart';

class Exchange extends StatefulWidget {
  Exchange({super.key});
  @override
  State<Exchange> createState() => _QGRulePageState();
}

class _QGRulePageState extends State<Exchange> {
  @override
  Widget build(BuildContext context) {

 final totalHeight = MediaQuery.of(context).size.height-260;
 final totalw = (MediaQuery.of(context).size.width-113)/2;

    return Column(
          crossAxisAlignment: CrossAxisAlignment.start,
         children: [
           Stack(
              children: [
                GestureDetector(
                  onTap: (){
                  toNamed('/home/exchange/parties');
                  },
                  child: wImage(url: 'shuzi',height: 200,width: double.infinity),
                )
                 ,
                Positioned(
                  bottom: 0,
                  right: 0,
                  left: 0,
                  child: 
                Container(
                  height: 20,
                  decoration: BoxDecoration(
                    color: Color(0XFFFFFFFF),
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(20),
                      topRight: Radius.circular(20),
                    )
                  ),
                )
                )
              ],
            ),
            Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Container(
                width: 82,
                height: totalHeight,
                decoration: BoxDecoration(
                color: Color(0XFFF8F9FD),
                  borderRadius: BorderRadius.only(
                    topRight: Radius.circular(15)
                  )
                ),
                  child:Column(
                    children: [


                        Container(
                          padding: EdgeInsets.symmetric(horizontal: 10,vertical: 10),
                            width: 82,
                            decoration: BoxDecoration(
                            color: Color(0XFF0F172B),
                              borderRadius: BorderRadius.only(
                                topRight: Radius.circular(15)
                              )
                            ),
                            child:   Text('藏品名称二十个字藏品名称二十个字藏品名称',maxLines: 2,overflow:TextOverflow.ellipsis,style: TextStyle(fontSize: 12,color: Color(0XFFFFFFFF)),)
                      ),

                    ],
                  )
                  
                ),
                Expanded(child: 
                  Container(
                     padding: EdgeInsets.symmetric(horizontal: 10),
                      child:  Wrap(
                                spacing: 10,
                                runSpacing: 10,
                                children: [
                                  GestureDetector(
                                    onTap: (){
                                      toNamed('/home/exchange/details');
                                    },
                                    child: Container(
                                    margin: EdgeInsets.only(bottom: 10),
                                    child:  Column(
                                    crossAxisAlignment: CrossAxisAlignment.start,
                                    children: [
                                      Stack(
                                        children: [
                                          wImage(url: 'quye',width: totalw,height: totalw,borderRadius: 10),
                                          Positioned(
                                            top: 10,
                                            left: 10,
                                            child: 
                                          wImage(url: 'xiyou',width:56),
                                          ),
                                        ],
                                      ),
                                      SizedBox(height: 3,),
                                      wText(text: '200m² 3D艺术展厅',size: 14,bold: true),
                                      SizedBox(height: 2,),
                                      wText(text: '已兑换200份',color: '878b95')
                                    ],
                                  ),
                                  ),
                                  )
                                  ,
                                  
                                ],
                              ),
                  )
                )
              ],
            )

            
          

          ],
        );
        
        
       
        
        
  }

  
}
